# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Ner0 <darkelfdarkelf666@yahoo.co.uk>

pkgname=pantheon-code
pkgver=7.0.0
pkgrel=1
pkgdesc='The Pantheon Text Editor'
arch=(loong64 x86_64)
url=https://github.com/elementary/code
license=(GPL3)
groups=(pantheon)
depends=(
  editorconfig-core-c
  glib2
  gtk3
  gtksourceview4
  libgee
  libgit2-glib
  libgranite.so
  libhandy-1.so
  libpeas
  pango
  polkit
)
makedepends=(
  cmake
  git
  gobject-introspection
  gtkspell3
  intltool
  libsoup
  meson
  vala
  vte3
  webkit2gtk
)
optdepends=(
  'gtkspell3: Spell Check plugin'
  'libsoup: Pastebin plugin'
  'vala: Outline plugin'
  'vte3: Terminal plugin'
  'webkit2gtk: Browser Preview plugin'
)
_tag=789487b06acc31aa62527176a79fbd5b56632424
source=(pantheon-code::git+https://github.com/elementary/code.git#tag=${_tag})
b2sums=(SKIP)

pkgver() {
  cd pantheon-code
  git describe --tags
}

build() {
  arch-meson pantheon-code build
  meson compile -C build
}

package() {
  meson install -C build --destdir "${pkgdir}"
}

# vim:set ts=2 sw=2 et:
